package com.zmn.oms.model.vo.work.erp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;
import java.util.Optional;

/**
 * @author sunlife
 * @date:2020/10/15 5:20 下午
 * description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PerfSharingVO {

    /**
     * 及时预约
     */
    private Integer onTimeDuty;

    /**
     * 准时上门
     */
    private Integer onTimeVisit;

    /**
     * 二十四小时完成
     */
    private Integer completeInDay;

    /**
     * 好评
     */
    private Integer praise;

    public Integer getTotalAmount(){
        return Optional.ofNullable(onTimeDuty).orElse(0) + Optional.ofNullable(onTimeVisit).orElse(0) + Optional.ofNullable(completeInDay).orElse(0) + Optional.ofNullable(praise).orElse(0);
    }

}
